package com.example.shengyin.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Data
@ApiModel("团队")
public class Team implements Serializable {
    @ApiModelProperty("编号")
    private Long id;

    @ApiModelProperty("团队名称")
    @NotBlank(message = "团队名称不能为空")
    private String tname;

    @ApiModelProperty("发布人")
    @NotNull(message = "发布人不能为空")

    private String poster;

    @ApiModelProperty("发布时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date postTime;

    @ApiModelProperty("是否启用")
    private Boolean isvalid;

    @ApiModelProperty("专家")
    private List<Professor> professor=new ArrayList(0);

    private static final long serialVersionUID = 1L;

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", tname=").append(tname);
        sb.append(", poster=").append(poster);
        sb.append(", posttime=").append(postTime);
        sb.append(", isvalid=").append(isvalid);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}